package com.jhgsys.internal.workflow.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * 流程节点按钮 Entity
 *
 * @author fenghaijun
 * @date 2024-07-19 09:18:06
 */
@Data
@TableName("workflow_node_button")
public class WorkflowNodeButton implements Serializable {

    /**
     * 主键
     */
    @TableId(value = "workflow_node_button_id", type = IdType.ASSIGN_UUID)
    private String workflowNodeButtonId;

    /**
     * 租户Id
     */
    @TableField("tenant_id")
    @NotNull(message = "{required}")
    private String tenantId;

    /**
     * 流程Id
     */
    @TableField("workflow_id")
    @NotNull(message = "{required}")
    private String workflowId;

    /**
     * 流程节点Id
     */
    @TableField("workflow_node_id")
    @NotNull(message = "{required}")
    private String workflowNodeId;

    /**
     * 按钮Id;唯一
     */
    @TableField("node_button_id")
    @NotBlank(message = "{required}")
    @Size(max = 64, message = "{noMoreThan}")
    private String nodeButtonId;

    /**
     * 按钮名称
     */
    @TableField("node_button_name")
    @NotBlank(message = "{required}")
    @Size(max = 90, message = "{noMoreThan}")
    private String nodeButtonName;

    /**
     * 按钮类型;1：通过按钮 2：退回按钮 3：拒绝按钮 4：自定义按钮
     */
    @TableField("node_button_type")
    @NotBlank(message = "{required}")
    @Size(max = 2, message = "{noMoreThan}")
    private String nodeButtonType;

    /**
     * 默认事件 0：否 1：是
     */
    @TableField("default_event")
    @Size(max = 1, message = "{noMoreThan}")
    private String defaultEvent;

    /**
     * 流转方式;1：下一节点 2：上一节点 3：指定节点
     */
    @TableField("transfer_way")
    @Size(max = 2, message = "{noMoreThan}")
    private String transferWay;

    /**
     * 指定节点Id
     */
    @TableField("transfer_node_id")
    private String transferNodeId;

    /**
     * 指定节点名称
     */
    @TableField("transfer_node_name")
    @Size(max = 90, message = "{noMoreThan}")
    private String transferNodeName;

    /**
     * 自定义事件
     */
    @TableField("custom_event")
    @Size(max = 255, message = "{noMoreThan}")
    private String customEvent;

    /**
     * 新增人
     */
    @TableField("created_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String createdBy;

    /**
     * 新增时间
     */
    @TableField("created_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    /**
     * 修改人
     */
    @TableField("updated_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String updatedBy;

    /**
     * 修改时间
     */
    @TableField("updated_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    /**
     * 删除人
     */
    @TableField("deleted_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String deletedBy;

    /**
     * 删除时间
     */
    @TableField("deleted_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date deletedTime;

    /**
     * 删除标记
     */
    @TableField("deleted_flg")
    @Size(max = 1, message = "{noMoreThan}")
    private String deletedFlg;

}